package com.example.consumer_order_feign_hystrix_fallback_stream.feign;

import com.example.consumer_order_feign_hystrix_fallback_stream.model.UserInf;
import feign.Headers;
import org.springframework.cloud.netflix.feign.EnableFeignClients;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.context.annotation.Primary;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

@FeignClient(name = "eureka-user",fallback = FeignFallback.class )
@Primary
public interface UserFeign {

    @GetMapping("/user/getById")
    @ResponseBody
    UserInf getById(@RequestParam("id") String id);
}
